package org.the.gsdo.server;

import org.springframework.context.ApplicationContext;

public class BeanProvider {

	private static ApplicationContext context;

	private BeanProvider() {}

	public static void setContext(ApplicationContext context) {
		BeanProvider.context = context;
	}

	public static <T> T getBean(Class<T> clazz) {
		return BeanProvider.context.getBean(clazz);
	}

	public static <T> T getBean(String qualifier, Class<T> clazz) {
		return BeanProvider.context.getBean(qualifier, clazz);
	}

}
